﻿/***********************************************************
! @File        : classes.h
 *  @Brief       : 这个类用于json和xml数据序列化和反序列化的定义，支持各个模块
 *  @Details     : 参照格式编写, 写下注释，先看示例再使用，防止出错哦，亲爱的
 *  @Author      : soda
 *  @Date        : 2023-06-09 09:26:04
 *  @Version     : v1.0
 *  @Copyright   : Copyright By soda, All Rights Reserved
 ***********************************************************/
#pragma once
#include <QSerializer>
#include <QQueue>
#include <QStack>
#include <QList>
#include <QString>


class StockRecord: public QSerializer
{
    Q_GADGET
    QS_SERIALIZABLE
public:
    QS_FIELD(int, code)
    QS_FIELD(QString, name)
    QS_FIELD(QString, up_price)
    QS_FIELD(QString, price)
    QS_FIELD(QString, down_price)

};

class StockInfomation: public QSerializer
{
    Q_GADGET
    QS_SERIALIZABLE
public:
    QS_FIELD(int, current_stock_code)
    QS_COLLECTION_OBJECTS(QList, StockRecord, stock_infomation)
};
